package com.xplan.actions;

import com.opensymphony.xwork2.ActionContext;

public class ErrorAction extends BaseAction {
	private StackTraceElement[] exceptions;
	public String execute() throws Exception {

		Exception exception = (Exception) ActionContext.getContext()
		.getValueStack().findValue("exception");
		if (this.debug) {
			// 开启debug模式 
			exceptions = exception.getStackTrace(); 
		}
		 
		
		return SUCCESS;
	}

	public StackTraceElement[] getExceptions() {
		return exceptions;
	}

	public void setExceptions(StackTraceElement[] exceptions) {
		this.exceptions = exceptions;
	}

}
